Feature/image processing enhancements#2
Closed
JacobBorden wants to merge 3 commits intodevelopmentfrom
Closed
Conversation
This commit introduces several enhancements to the bitmap image processing library:
Added:
- New image manipulation functions:
- Invert Colors: Inverts the RGB values of each pixel.
- Sepia Tone: Applies a classic sepia filter.
- Box Blur: Applies a configurable box blur effect.
- Comprehensive unit testing framework (`tests/test_bitmap.cpp`) using CMake/CTest.
- Unit tests covering:
- Pixel-level operations (Greyscale, Invert, Sepia, Brightness, Contrast, Saturation, Luminance, including color-specific variants).
- Image-level operations (BoxBlur, Shrink, Rotate, and basic validity checks for others).
- `README.md`: Details project features, dependencies, build instructions, and basic usage.
- `CHANGELOG.md`: Tracks changes, starting with this set of enhancements as v0.1.0.
Changed:
- Refined contrast adjustment logic for secondary colors (Magenta, Yellow, Cyan) to apply contrast directly to their constituent primary color channels for more predictable results.
- Significantly improved inline code documentation in `src/bitmap.h` and `src/bitmap.cpp` for all functions, enhancing clarity on purpose, parameters, and logic.
- Standardized clamping of pixel color components to the 0-255 range across various functions.
- Refactored `main.cpp` to serve as a clearer demonstration of library features, including new functions and better error handling for file operations.
Fixed:
- Corrected syntax errors in the original implementations of `ChangePixelContrastMagenta` and `ChangePixelContrastCyan`.
- Addressed incorrect variable usage (e.g., `magenta` vs `cyan`) in `ChangePixelContrastCyan`.
- Corrected `std::min` usage in several saturation and luminance functions.
- Improved GDI resource management in `ScreenShotWindow` by ensuring proper cleanup of device contexts and bitmap handles.
- Corrected minor typos in function parameter names and conditional logic in some pixel manipulation functions.
This commit addresses several issues in the CMake configuration: - Updated `cmake_minimum_required` in the root `CMakeLists.txt` from VERSION 3.0.0 to VERSION 3.10 to align with modern CMake practices and resolve a deprecation warning. - Corrected the CPack module inclusion in the root `CMakeLists.txt` from `include(Cpack)` to `include(CPack)`, fixing a case-sensitivity error that prevented CMake from finding the module. Note: Similar `cmake_minimum_required` deprecation warnings and CPack inclusion errors may still appear from external dependencies (`dependencies/bitmapfile` and `dependencies/matrix`) which are managed via `FetchContent`. These issues reside within the external projects themselves and are not directly modifiable in this repository. The changes in this commit resolve the errors originating from the project's own CMake scripts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.